import React from 'react'
import {
  UserOutlined,
  AppstoreOutlined,
  ShoppingOutlined,
  FundProjectionScreenOutlined,
  EditOutlined,
  EnvironmentOutlined
} from '@ant-design/icons'

function generateIcon (iconName: string) {
  if (iconName === 'icon-user') {
    return React.createElement(UserOutlined)
  } else if (iconName === 'icon-menu') {
    return React.createElement(AppstoreOutlined)
  } else if (iconName === 'goods') {
    return React.createElement(ShoppingOutlined)
  } else if (iconName === 'data-analysis') {
    return React.createElement(FundProjectionScreenOutlined)
  } else if (iconName === 'edit') {
    return React.createElement(EditOutlined)
  } else if (iconName === 'map-location') {
    return React.createElement(EnvironmentOutlined)
  }
}

export { generateIcon }
